<%-- 
    Document   : found
    Created on : Jun 23, 2011, 12:33:14 PM
    Author     : A7med Kotb
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Main Task Page</title>
        <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui-1.8.6.custom.css" />
        <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>

        <style>
            .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
            .ui-timepicker-div dl{ text-align: left; }
            .ui-timepicker-div dl dt{ height: 25px; }
            .ui-timepicker-div dl dd{ margin: -25px 10px 10px 65px; }
            .ui-timepicker-div td { font-size: 90%; }
        </style>
    </head>
    <body>
        <script>
            $(function() {
                $( "#startDate" ).datepicker();
            });
            $(function() {
                $('#startTime').timepicker({
                    ampm: false,
                    hourMin: 0,
                    hourMax: 23
                });
            });
        </script>
        <html:form action="/MainTaskURL.do">
            <html:hidden property="index" value="found"></html:hidden>
                <table>
                    <tr>
                        <td colspan="2" align="center"><h2>Main Task Data</h2></td>
                    </tr>
                    <tr>
                        <td>Task Name</td>
                        <td><html:text property="taskName" value="${mytask.getTaskName()}" size="40" readonly="true"></html:text>
                        <div><html:errors property="EmptyTaskName"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Task Type</td>
                        <td><html:text property="taskType" value="${mytask.getTaskType()}" size="40" readonly="true"></html:text>
                        <div><html:errors property="EmptyTaskType"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Schedule Period</td>
                        <td><html:select property="schedule" size="1" styleId="schedule" value="${mytask.getSchedule()}">
                            <html:option value="Hourly">Hourly</html:option>
                            <html:option value="Daily">Daily</html:option>
                            <html:option value="Weekly">Weekly</html:option>
                            <html:option value="Monthly">Monthly</html:option>
                        </html:select><div id="schedulediv"></div>
                        <div><html:errors property="EmptySchedule"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Schedule Modifier</td>
                        <td><html:text property="modifier" value="${mytask.getModifier()}" size="40"></html:text>
                        <div><html:errors property="EmptyModifier"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Schedule Start Date</td>
                        <td><html:text styleId="startDate" property="startDate" value="${startdate}" size="40"></html:text>
                        <div><html:errors property="EmptyStartDate"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Schedule Start Time</td>
                        <td><html:text styleId="startTime" property="startTime" value="${mytask.getStartTime()}" size="40"></html:text>
                        <div><html:errors property="EmptyStartTime"></html:errors></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Day</td>
                        <td><html:select property="day" size="1" value="${mytask.getDay()}">
                            <html:option value="FRI">FRI</html:option>
                            <html:option value="SAT">SAT</html:option>
                            <html:option value="SUN">SUN</html:option>
                            <html:option value="MON">MON</html:option>
                            <html:option value="TUE">TUE</html:option>
                            <html:option value="WED">WED</html:option>
                            <html:option value="THU">THU</html:option>
                        </html:select>
                        <div><html:errors property="EmptyDay"/></div></td>
                </tr>
                <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
                <tr>
                    <td>

                    </td>
                    <td>
                        <html:submit value="Update" property="actionType"></html:submit> 
                        <html:submit value="Start" property="actionType"></html:submit>
                        <html:submit value="Enable" property="actionType"></html:submit>
                        <html:submit value="Disable" property="actionType"></html:submit>
                        <html:submit value="Delete" property="actionType"></html:submit>
                        </td>

                    </tr>
                </table>
        </html:form>            
    </body>
</html>
